package com.wang.bootdemo.controller;

import com.wang.bootdemo.service.TypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;


@Controller
public class TestController {
    @Autowired
    TypeService typeService;

    @GetMapping("/test" )
    @ResponseBody
    public String test(){
        return "Wang Chi";
    }

    @GetMapping("/login")
    public String login(){
        return "login";
    }
    @GetMapping("/home")
    public  String home(){
        return "home";
    }
    @GetMapping("/selectAll")
    @ResponseBody
    public String selectAll(){
        return typeService.SelectAll().toString();
    }

}
